<!--
 * @Author: tianbo 8592865+hanqifeitb@user.noreply.gitee.com
 * @Date: 2025-01-29 22:28:48
 * @LastEditors: tianbo 8592865+hanqifeitb@user.noreply.gitee.com
 * @LastEditTime: 2025-03-04 14:14:54
 * @FilePath: /nuxt-front/components/RegisterInfo.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
     <div class="register-tip" v-if="userStore.hideVisble" :style="props.centerLeft ? 'justify-content: center' : ''">
          <div class="left">
            <span class="tip-text">还没有注册账号？</span>
            <span class="register-link" @click="handleRegister">立即注册></span>
          </div>
          <div class="right"  v-if="props.showForgotPassword">
            <span class="forgot-password" style="color: #E52121">忘记密码？</span>
          </div>
        </div>
</template>
<script setup>
import { defineProps } from 'vue';
import { useUserStore } from '@/stores/User.js';
const props=defineProps({
  centerLeft:{type:Boolean,default:true},
  showForgotPassword:{type:Boolean,default:false},
  loginCommit:{type:Object,default:()=>({})}
})
const userStore = useUserStore();
const router = useRouter();

const handleRegister = async () => {
  // 更新状态
  userStore.closeMaskOut(false)
  // 使用带时间戳的路由跳转
  await navigateTo(`/registerUser?t=${Date.now()}`);
}
</script>
<style lang="scss" scoped>
.tip-text{
    font-size: 14px;
    color:#999999;
}
.register-link{
    font-size: 14px;
    color:#126983;
    font-weight: 400;

}
.register-tip{
  display:flex;
  width: 100%;
  justify-content: space-between;
}</style>